﻿#region Using Statements

#endregion

namespace DirectZZT.Shared.Network
{
    #region Client packet id

    /// <summary>
    /// Specifies the Ids of the packets sent from client to server.
    /// </summary>
    public enum ClientPacketId
    {
        /// <summary>
        /// Default value.
        /// </summary>
        Invalid = 0,
        /// <summary>
        /// The player moved to a different position.
        /// </summary>
        PositionUpdate = 1,
        /// <summary>
        /// A message was sent.
        /// </summary>
        Message = 10,
    }

    #endregion

    /// <summary>
    /// Contains the client packet.
    /// </summary>
    public class ClientPacket
    {
        /// <summary>
        /// Defines the type of packet.
        /// </summary>
        public ClientPacketId Id;

        /// <summary>
        /// The message packet.
        /// </summary>
        public ClientMessagePacket Message;
    }

    /// <summary>
    /// Represents the "Message" client packet.
    /// </summary>
    public class ClientMessagePacket
    {
        /// <summary>
        /// Whether or not this is a system message.
        /// </summary>
        public bool IsSystem;
        /// <summary>
        /// The sender (optional).
        /// </summary>
        public string Sender;
        /// <summary>
        /// The message.
        /// </summary>
        public string Message;
    }
}
